package com.ksvip.next.components.util.rowkey;

public class Logarithm {
    public static double log(double value, double base) {
        return Math.log(value) / Math.log(base);
    }

    /**
     * 预分区个数 大于等于10 小于等于99
     *
     * @param region [10,99]
     * @return
     */
    public static byte[][] splitKeys(int region) {
        byte[][] splitKeys = new byte[region][];
        for (int i = 0; i < region; i++) {
            String formatregion = String.format("%02d", i);
            splitKeys[i] = formatregion.getBytes();
        }
        return splitKeys;
    }
}
